package com.gupaoedu.springboot.springbootstarterdemo;

import com.gupaoedu.starter.HelloFormatTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *
 * </p>
 *
 * @author Nicky
 * @since 2019-07-13
 */
@RestController
public class FormatController {

    @Autowired
    private HelloFormatTemplate helloFormatTemplate;

    @GetMapping("/format")
    public String doFormat(){
        User user = new User();
        user.setAge(18);
        user.setName("Nicky");
        return  helloFormatTemplate.doFormat(user);
    }
}
